﻿using Glue;
using Xunit;

namespace GlueTests.RelationsVerificationTests
{
    public class When_a_property_is_readonly
    {
        private readonly IRelationsVerification relationVerification;

        public class DomainPerson
        {
            public int Id { get; private set; }
        }

        public class GuiPerson
        {
            public int Id { get; set; }
        }

        public When_a_property_is_readonly()
        {
            var mapping = new Mapping<DomainPerson, GuiPerson>();
            relationVerification = mapping.GetRelationsVerification();
        }

        [Fact]
        public void Should_verify_towards_not_related_readonly_property()
        {
            relationVerification.AssertAllPropertiesRelated<DomainPerson>();
        }
    }

}
